﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ShutUp
{
    public static class NotifyIconHelper
    {
        public static NotifyIcon NotifyIcn { get; set; }

        public static void Initialize()
        {
            NotifyIcn = new NotifyIcon();
            NotifyIcn.Icon = ChatHelper.convertToIcon(System.Drawing.Image.FromFile(Application.StartupPath + "\\Plugins\\ShutUp\\Forms\\BarryDurex"),
                System.Drawing.Color.Empty);
            NotifyIcn.Text = "[ShutUp]";
            NotifyIcn.MouseDoubleClick += new MouseEventHandler(NotifyIcn_MouseDoubleClick);
            NotifyIcn.ContextMenuStrip = new UpdateForm().contextMenuStrip1;
            NotifyIcn.Visible = false;
            Styx.Common.Logging.Write(System.Windows.Media.Colors.Red, "[ShutUp] NotifyIconHelper - Initialize");
        }

        private static void NotifyIcn_MouseDoubleClick(object obj, MouseEventArgs args)
        {
            var _configForm = new SettingsForm();
            _configForm.Show();
        }
        
    }
}
